import { AnyAction } from "redux";
import { produce } from "immer";
const useState = {
	useName: "--"
};
const useInfo = (state = useState, action: AnyAction) =>
	produce(state, draftState => {
		switch (action.type) {
			case "SET_USE_NAME":
				console.log("SET_USE_NAME", action.useName);
				draftState.useName = action.useName;
				break;
			default:
				return draftState;
		}
	});

export default useInfo;
